<# # It is recommended to test the script on a local machine for its purpose and effects. # Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: Script to fetch Hard Disk Details i.e) Hard Disk Model,Hard Disk Type, Hard Disk Size, Operational Status # Configuration Type - Computer #> # Get all hard disks in the system $hardDisks = Get-PhysicalDisk # Loop through each hard disk and retrieve detailed information foreach ($disk in $hardDisks) { $diskType = $disk.MediaType $diskSizeGB = [math]::Round($disk.Size / 1GB, 2) $diskModel = $disk.Model $diskStatus = $disk.OperationalStatus # Display the retrieved information Write-Host "Hard Disk Model: $diskModel" Write-Host "Hard Disk Type: $diskType" Write-Host "Hard Disk Size: $diskSizeGB GB" Write-Host "Operational Status: $diskStatus" }